ScxV6Area.Copy Method
Copies an Area of Interest to a new parent.
Parameters
- NewParentID
The numeric identifier of the target Area of Interest.
The following example written in VB.NET copies one group into another.
' Connect to the server
Svr = New ScxV6DbClient.ScxV6Server()
Svr.Connect("MAIN", "", "")
' Find the area of interest we want to move
Areas = Svr.RootArea.List
Dim AreaToCopy As ScxV6DbClient.ScxV6Area
AreaToCopy = Nothing
Dim TargetAreaId As Integer
For Each Area As ScxV6DbClient.ScxV6Area In Areas
If Area.Name = "Target" Then
TargetAreaId = Area.ID
ElseIf Area.Name = "Area 2" Then
AreaToCopy = Area
End If
Next
If (Not AreaToCopy Is Nothing) Then
AreaToCopy.Copy(TargetAreaId)
End If
' Disconnect
Svr.Disconnect()